package org.guajava.controller.system;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.guajava.domain.SysOperLog;
import org.guajava.framework.web.base.BaseController;
import org.guajava.framework.web.page.TableDataInfo;
import org.guajava.service.ISysOperLogService;

import java.util.List;

/**
 * SysLogInfoController.java
 *
 * @Description:
 * @author: lishiming
 * @Date: 10:43 2019/1/9
 */
@Controller
@RequestMapping("/system/operLog")
public class SysLogInfoController extends BaseController{
    private String prefix = "system/operLog";

    @Autowired
    private ISysOperLogService sysOperLogService;

    @GetMapping()
    public String log() {
        return prefix + "/operLogInfo";
    }

    @PostMapping("/operLogList")
    @ResponseBody
    public TableDataInfo list(SysOperLog operLog) {
        startPage();
        List<SysOperLog> operLogList = sysOperLogService.selectOperLogList(operLog);
        return getDataTable(operLogList);
    }
}
